home *** CD-ROM | disk | FTP | other *** search
- head 1.6;
- branch ;
- access ;
- symbols sprited:1.6.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.6
- date 90.11.06.17.21.14; author rab; state Exp;
- branches 1.6.1.1;
- next 1.5;
-
- 1.5
- date 89.08.18.11.45.04; author rab; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 89.02.14.23.41.29; author rab; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 89.01.06.07.05.25; author rab; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 88.06.29.14.57.50; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.21.16.42.07; author ouster; state Exp;
- branches ;
- next ;
-
- 1.6.1.1
- date 91.11.18.15.50.25; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.6
- log
- @Changed extern to _EXTERN for g++.
- @
- text
- @/*
- * assert.h --
- *
- * Definition of assert() macro.
- *
- * Copyright 1988 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- *
- * $Header: /sprite/src/lib/include/RCS/assert.h,v 1.5 89/08/18 11:45:04 rab Exp Locker: rab $
- */
-
- #include <cfuncproto.h>
-
- #ifdef assert
- #undef assert
- #endif
-
- #ifdef _assert
- #undef _assert
- #endif
-
- #ifndef NDEBUG
- #ifdef KERNEL
- #ifdef __STDC__
-
- #define _assert(ex) { if (!(ex)) { panic(\
- "Assertion failed: (" #ex ") file \"%s\", line %d\n", __FILE__, __LINE__);}}
-
- #else /* __STDC__ */
-
- #define _assert(ex) { if (!(ex)) { panic(\
- "Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);}}
- #endif /* __STDC__ */
-
- #else /* KERNEL */
-
- _EXTERN void __eprintf _ARGS_ ((_CONST char *string,
- int line, _CONST char *filename));
-
- #ifdef __STDC__
-
- #define _assert(ex) { if (!(ex)) { __eprintf( \
- "Assertion failed: (" #ex ") line %d of \"%s\"\n", __LINE__, __FILE__);\
- abort();}}
-
- #else /* __STDC__ */
-
- #define _assert(ex) { if (!(ex)) { __eprintf( \
- "Assertion failed: line %d of \"%s\"\n", __LINE__, __FILE__);\
- abort();}}
-
- #endif /* __STDC__ */
-
- #endif /* KERNEL */
-
- # define assert(ex) _assert(ex)
- # else /* !NDEBUG */
- # define _assert(ex)
- # define assert(ex)
- # endif /* !NDEBUG */
-
- @
-
-
- 1.6.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d15 1
- a15 1
- * $Header: /sprite/src/lib/include/RCS/assert.h,v 1.6 90/11/06 17:21:14 rab Exp $
- @
-
-
- 1.5
- log
- @Modified macros to use gnulib eprintf().
- @
- text
- @d15 1
- a15 1
- * $Header: /sprite/src/lib/include/RCS/assert.h,v 1.4 89/02/14 23:41:29 rab Exp Locker: rab $
- d18 2
- d39 1
- d41 1
- a41 1
- #endif /* __STDC__ */
- d43 2
- a45 1
- #else /* KERNEL */
- a47 2
- extern void __eprintf(const char *string, int line, const char *filename);
-
- a52 2
-
- extern void __eprintf();
- @
-
-
- 1.4
- log
- @Fixed assert macro to call `panic' if used in the kernel.
- @
- text
- @d15 1
- a15 1
- * $Header: /sprite/src/lib/include/RCS/assert.h,v 1.3 89/01/06 07:05:25 rab Exp Locker: rab $
- d44 4
- a47 2
- #define _assert(ex) { if (!(ex)) { (void) fprintf(stderr,\
- "Assertion failed: (" #ex ") file \"%s\", line %d\n", __FILE__, __LINE__);\
- d52 4
- a55 2
- #define _assert(ex) { if (!(ex)) { (void) fprintf(stderr,\
- "Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);\
- @
-
-
- 1.3
- log
- @Fixed assert() to call abort instead of exit.
- @
- text
- @d15 1
- a15 1
- * $Header$
- d27 1
- d30 14
- d55 3
- @
-
-
- 1.2
- log
- @Add ifdefs so that file can't be processed twice.
- @
- text
- @d1 15
- a15 3
- /* assert.h 4.2 85/01/21 */
- /* This file was taken from BSD and has AT&T roots. Because of this it
- * cannot be redistributed except to properly licensed sites.
- d18 3
- a20 2
- #ifndef _ASSERT
- #define _ASSERT
- d22 18
- a39 2
- # ifndef NDEBUG
- # define _assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);exit(1);}}
- d41 1
- a41 1
- # else
- d44 1
- a44 1
- # endif
- a45 1
- #endif _ASSERT
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d2 3
- d6 3
- d16 2
- @
-